let xueshuurl="http://localhost:3006/xueshu"
// 学术信息
function appendXueshu(value){
    let li=document.createElement("li");
    li.className=value.time;
    let a=document.createElement("a");
    a.href="#";
    let div1=document.createElement("div");
    let div2=document.createElement("div");
    div1.className="part-title";
    div1.textContent=value.title;
    div2.className="content";
    div2.textContent=value.subtitle;
    li.appendChild(a);
    a.append(div1);
    a.append(div2);
    return li;
}



let xueshuResp=new XMLHttpRequest();
xueshuResp.open("GET",xueshuurl,true);
xueshuResp.onreadystatechange=function(){
    if(xueshuResp.readyState===4 && xueshuResp.status===200){
        let value=JSON.parse(xueshuResp.responseText);
        let node=document.getElementById("xueshu");
        for(let i=0;i<value.length;i++){
            node.appendChild(appendXueshu(value[i]));
        }
    }
}
xueshuResp.send();